package com.example.demo.dao;

import com.example.demo.pojo.DeviceEntity;
import java.util.List;

import com.example.demo.pojo.MessageEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
* @author: xuange123
* @time: 2019-08-28 11:28
* @table: device
* @description: 
*/

@Mapper
public interface DeviceMapper {

    /**
     * @param  entity  table entity
     * @return List<DeviceEntity>
     */
    List<DeviceEntity> getByCondition(DeviceEntity entity);

    /**
     * @param  deviceId  
     * @return DeviceEntity
     */
    DeviceEntity getByDeviceId(@Param("deviceId") Integer deviceId);

    /**
     * @param  entity  table entity
     * @return int
     */
    int insert(DeviceEntity entity);

    /**
     * @param entity  table entity
     * @return int
     */
    int updateById(DeviceEntity entity);

    List<DeviceEntity> getAllDevice();

    List<DeviceEntity> getTypeDevice(@Param("deviceType") String deviceType);


}